/**
 * 角色表格列
 */
import { ref, h } from 'vue'
import { user } from '../../../entity/system/user'
import { TableColumnProps } from '../../../components/base/table/table-props'
import { Role } from '@/entity/system/role'

export const columns: Array<TableColumnProps<Role>> = [
  {
    title: '编号',
    customRender: ({ index }) => index + 1,
    width: 60,
    align: 'center',
  },
  {
    title: '角色名称',
    dataIndex: 'name',
    width: 100,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    customRender: ({ record }) => (record.createTime ? record.createTime.replace('T', ' ') : ''),
    width: 200,
  },
  {
    title: '修改时间',
    dataIndex: 'lastUpdateTime',
    customRender: ({ record }) => (record.lastUpdateTime ? record.lastUpdateTime.replace('T', ' ') : ''),
    width: 200,
  },
  {
    title: '操作',
    dataIndex: 'action',
    width: 200,
    align: 'center',
    fixed: 'right',
  },
]
